package com.example.hospital.respository;

import com.example.model.domain.entity.hospital.Schedule;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.Date;
import java.util.List;

/**
 * @Author juzipi
 * @Date 2021/5/6 14:23
 * @Info
 */
public interface ScheduleRepository extends MongoRepository<Schedule, String> {


    /**
     * 根据hoscode，hosScheduleId获取Schedule
     * @param hoscode
     * @param hosScheduleId
     * @return
     */
    Schedule getScheduleByHoscodeAndHosScheduleId(String hoscode, String hosScheduleId);


    /**
     * 根据hoscode，depcode，workDate查询Schedule集合
     * @param hoscode
     * @param depcode
     * @param workDate
     * @return
     */
    List<Schedule> getScheduleByHoscodeAndDepcodeAndWorkDate(String hoscode, String depcode, Date workDate);

    /**
     * 根据id查询Schedule
     * @param scheduleId
     * @return
     */
    Schedule getScheduleById(String scheduleId);

    /**
     * 查询schedule
     * @param scheduleId
     * @return
     */
    Schedule getScheduleByHosScheduleId(String scheduleId);

}
